package com.boot2.core.utils;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author zhangweilin
 * @Description: xxxxx
 * @date 2020/10/19
 */
public class ListsUtil {

    /**
     * 分割list
     *
     * @param list
     * @param groupSize
     * @return
     */
    public static <T> List<List<T>> splitList(List<T> list, int groupSize) {
        return Lists.partition(list, groupSize); // 使用guava
    }
}
